﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>查看考试</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/Jqbox.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery-1.5.2.min.js" type="text/javascript"></script>
    <script src="../js/ligerui.min.js" type="text/javascript"></script>
    <script src="../Js/jquery.dialog.js" type="text/javascript"></script>
    <script src="../Js/conmon.js" type="text/javascript"></script>
     <script type="text/javascript">
         var $grid;
         var maiheight = 500;
         var maiwidth = 600;
         var $selectRow = null;
         var vUrl = null;
         $(function () {
             maiheight = $(parent.window).height();
             maiwidth = $(parent.window).width();

             $("#txtBeginDate").ligerDateEditor({ format: "yyyy-MM-dd" });
             $("#txtEndDate").ligerDateEditor({ format: "yyyy-MM-dd" });


             //显示gride
             $grid = $("#maingrid").ligerGrid({
                 columns: [
               { display: '序号', align: 'left', width: 40, type: 'int', isSort: false,
                   render: function (item, i) {
                       i = i + 1;
                       return i;
                   }
               },
                { display: '考场名称', name: 'ExamName', align: 'left', width: 120 },
                { display: '考试时间', name: 'C_Date',type: 'date', dateFormat: "yyyy-MM-dd", width: 100 },
                 { display: '答题时间(分钟)', name: 'C_Time', width: 120 },
                { display: '考试分数', name: 'C_Score', width: 80 },
                { display: '状态', name: 'C_Status', isSort: false, width: 60,
                    render: function (item) {

                        if (item.C_Status == -1) return "评分";
                        else if (item.C_Status == 0) return "阅卷";
                        else if (item.C_Status == 1) return "不合格";
                        else if (item.C_Status == 2) return "合格";

                    }
                }

                ],
                 parms: [{ name: 'beginDate', value: $("#txtBeginDate").val() }, { name: 'endDate', value: $("#txtBeginDate").val() }],
                 dataAction: 'server', pageSize: 20,
                 url: '../WebServer/ExamRoom.ashx?Action=CandidateList2',
                 sortName: 'ExamName'


             });
         });

         function loadGrid() {
             if (!$grid) return;
             $("tbody > tr", $grid.gridbody).each(function () {
                 $(this).remove();
             });
             $grid.setOptions({parms: [{ name: 'beginDate', value: $("#txtBeginDate").val() }, { name: 'endDate', value: $("#txtBeginDate").val() }], newPage: 1, Rows: [], Total: 0 });   //设置数据参数

             $grid.loadData(true); //加载数据

         }
       
    </script>
</head>
<body>
   <div class="l-panel-search">
                <div class="l-panel-search-item">
                   <span>日期：</span>
                </div>
                <div class="l-panel-search-item">
                    <input id="txtBeginDate" type="text" ltype="text" />
                </div>
                <div class="l-panel-search-item">至</div>
                <div class="l-panel-search-item">
                    <input id="txtEndDate" type="text" ltype="text" />
                </div>                             
                <div class="l-panel-search-item">
                    <a  class="l-button" style="width:60px; float:left; margin-left:10px;"   onclick="loadGrid()">查询</a><label></label>
                </div>
 </div>
   <div id="maingrid"> </div> 
</body>
</html>
